home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / dev / lang / SmallEiffel.lha / SmallEiffel / bin_c / short8.c < prev    next >
C/C++ Source or Header  |  1998-12-22  |  17KB  |  832 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.79)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "short.h"
  9.  
  10.  
  11. void r323add_last(T323* C,T0* a1){
  12. T2 _new_capacity=0;
  13. /*[IF*/
  14. if(((C)->_capacity/*4*/)<((r323count(C))+(1))){
  15. /*[IF*/
  16. if(((C)->_capacity/*4*/)==(0)){
  17. C->_capacity=16;
  18. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  19. }
  20. else{
  21. _new_capacity=(2)*((C)->_capacity/*4*/);
  22. C->_storage=r322realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  23. C->_capacity=_new_capacity;
  24. }
  25. /*FI]*/
  26. }
  27. /*FI]*/
  28. C->_upper=((C)->_upper/*8*/)+(1);
  29. /*[IRF3.6put*/{T323* C1=C;
  30. T0* b1=a1;
  31. T2 b2=(C)->_upper/*8*/;
  32. ((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
  33. }/*]*/
  34. }
  35.  
  36.  
  37. T6 r323valid_index(T323* C,T2 a1){
  38. T6 R=0;
  39. R=(((C)->_lower/*12*/)<=(a1))&&((a1)<=((C)->_upper/*8*/));
  40. return R;
  41. }
  42.  
  43.  
  44. T2 r323count(T323* C){
  45. T2 R=0;
  46. R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  47. return R;
  48. }
  49. /*No:ARRAY[RUN_CLASS].lower*/
  50.  
  51.  
  52. T6 r323fast_has(T323* C,T0* a1){
  53. T6 R=0;
  54. R=r323valid_index(C,r323fast_index_of(C,a1));
  55. return R;
  56. }
  57.  
  58.  
  59. T2 r323fast_index_of(T323* C,T0* a1){
  60. T2 R=0;
  61. R=((C)->_lower/*12*/)+(r322fast_index_of((C)->_storage/*0*/,a1,((C)->_upper/*8*/)-((C)->_lower/*12*/)));
  62. return R;
  63. }
  64. /*No:ARRAY[RUN_CLASS].upper*/
  65. /*No:ARRAY[RUN_CLASS].capacity*/
  66. /*No:ARRAY[RUN_CLASS].put*/
  67. /*No:ARRAY[RUN_CLASS].storage*/
  68.  
  69.  
  70. T0* r50twin(T50* C){
  71. T0* R=NULL;
  72. R=malloc(sizeof(*C));
  73. *((T50*)R)=M50;
  74. r50copy(((T50*)R),((T0*)C));
  75. return R;
  76. }
  77. /*No:ARRAY[ASSERTION].clear_all*/
  78.  
  79.  
  80. void r50add_last(T50* C,T0* a1){
  81. T2 _new_capacity=0;
  82. /*[IF*/
  83. if(((C)->_capacity/*4*/)<((r50count(C))+(1))){
  84. /*[IF*/
  85. if(((C)->_capacity/*4*/)==(0)){
  86. C->_capacity=16;
  87. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  88. }
  89. else{
  90. _new_capacity=(2)*((C)->_capacity/*4*/);
  91. C->_storage=r51realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  92. C->_capacity=_new_capacity;
  93. }
  94. /*FI]*/
  95. }
  96. /*FI]*/
  97. C->_upper=((C)->_upper/*8*/)+(1);
  98. /*[IRF3.6put*/{T50* C1=C;
  99. T0* b1=a1;
  100. T2 b2=(C)->_upper/*8*/;
  101. ((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
  102. }/*]*/
  103. }
  104. /*No:ARRAY[ASSERTION].set_all_with*/
  105.  
  106.  
  107. T0* r50item(T50* C,T2 a1){
  108. T0* R=NULL;
  109. R=((C)->_storage/*0*/)[(a1)-((C)->_lower/*12*/)];
  110. return R;
  111. }
  112.  
  113.  
  114. T6 r50valid_index(T50* C,T2 a1){
  115. T6 R=0;
  116. R=(((C)->_lower/*12*/)<=(a1))&&((a1)<=((C)->_upper/*8*/));
  117. return R;
  118. }
  119.  
  120.  
  121. T2 r50count(T50* C){
  122. T2 R=0;
  123. R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  124. return R;
  125. }
  126. /*No:ARRAY[ASSERTION].lower*/
  127.  
  128.  
  129. T6 r50fast_has(T50* C,T0* a1){
  130. T6 R=0;
  131. R=r50valid_index(C,r50fast_index_of(C,a1));
  132. return R;
  133. }
  134.  
  135.  
  136. void r50make(T50* C,T2 a1,T2 a2){
  137. T2 _needed=0;
  138. C->_lower=a1;
  139. C->_upper=a2;
  140. _needed=((a2)-(a1))+(1);
  141. /*[IF*/
  142. if((_needed)>(0)){
  143. /*[IF*/
  144. if(((C)->_capacity/*4*/)<(_needed)){
  145. C->_storage=calloc(_needed,sizeof(T0*));
  146. C->_capacity=_needed;
  147. }
  148. else{
  149. /*[IRF3.6clear_all*/{T50* C1=C;
  150. T0* __value=NULL;
  151. /*[IRF3.6set_all_with*/{T50* C2=C1;
  152. T0* c1=__value;
  153. r51set_all_with((C2)->_storage/*0*/,c1,((C2)->_upper/*8*/)-((C2)->_lower/*12*/));
  154. }/*]*/
  155. }/*]*/
  156. }
  157. /*FI]*/
  158. }
  159. /*FI]*/
  160. }
  161.  
  162.  
  163. T2 r50fast_index_of(T50* C,T0* a1){
  164. T2 R=0;
  165. R=((C)->_lower/*12*/)+(r51fast_index_of((C)->_storage/*0*/,a1,((C)->_upper/*8*/)-((C)->_lower/*12*/)));
  166. return R;
  167. }
  168. /*No:ARRAY[ASSERTION].upper*/
  169.  
  170.  
  171. void r50clear(T50* C){
  172. C->_upper=((C)->_lower/*12*/)-(1);
  173. }
  174.  
  175.  
  176. void r50copy(T50* C,T0* a1){
  177. T2 _needed_capacity=0;
  178. C->_lower=(((T50*)a1))->_lower/*12*/;
  179. C->_upper=(((T50*)a1))->_upper/*8*/;
  180. _needed_capacity=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  181. /*[IF*/
  182. if(((C)->_capacity/*4*/)<(_needed_capacity)){
  183. C->_capacity=_needed_capacity;
  184. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  185. }
  186. /*FI]*/
  187. /*[IF*/
  188. if((_needed_capacity)>(0)){
  189. r51copy_from((C)->_storage/*0*/,(((T50*)a1))->_storage/*0*/,(_needed_capacity)-(1));
  190. }
  191. /*FI]*/
  192. }
  193.  
  194.  
  195. T6 r50empty(T50* C){
  196. T6 R=0;
  197. R=(r50count(C))==(0);
  198. return R;
  199. }
  200. /*No:ARRAY[ASSERTION].capacity*/
  201. /*No:ARRAY[ASSERTION].put*/
  202. /*No:ARRAY[ASSERTION].storage*/
  203. /*No:ARRAY[E_REQUIRE].clear_all*/
  204.  
  205.  
  206. void r315add_last(T315* C,T0* a1){
  207. T2 _new_capacity=0;
  208. /*[IF*/
  209. if(((C)->_capacity/*4*/)<((r315count(C))+(1))){
  210. /*[IF*/
  211. if(((C)->_capacity/*4*/)==(0)){
  212. C->_capacity=16;
  213. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  214. }
  215. else{
  216. _new_capacity=(2)*((C)->_capacity/*4*/);
  217. C->_storage=r316realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  218. C->_capacity=_new_capacity;
  219. }
  220. /*FI]*/
  221. }
  222. /*FI]*/
  223. C->_upper=((C)->_upper/*8*/)+(1);
  224. /*[IRF3.6put*/{T315* C1=C;
  225. T0* b1=a1;
  226. T2 b2=(C)->_upper/*8*/;
  227. ((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
  228. }/*]*/
  229. }
  230. /*No:ARRAY[E_REQUIRE].set_all_with*/
  231.  
  232.  
  233. T0* r315item(T315* C,T2 a1){
  234. T0* R=NULL;
  235. R=((C)->_storage/*0*/)[(a1)-((C)->_lower/*12*/)];
  236. return R;
  237. }
  238.  
  239.  
  240. T6 r315valid_index(T315* C,T2 a1){
  241. T6 R=0;
  242. R=(((C)->_lower/*12*/)<=(a1))&&((a1)<=((C)->_upper/*8*/));
  243. return R;
  244. }
  245.  
  246.  
  247. T2 r315count(T315* C){
  248. T2 R=0;
  249. R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  250. return R;
  251. }
  252. /*No:ARRAY[E_REQUIRE].lower*/
  253.  
  254.  
  255. T6 r315fast_has(T315* C,T0* a1){
  256. T6 R=0;
  257. R=r315valid_index(C,r315fast_index_of(C,a1));
  258. return R;
  259. }
  260.  
  261.  
  262. void r315make(T315* C,T2 a1,T2 a2){
  263. T2 _needed=0;
  264. C->_lower=a1;
  265. C->_upper=a2;
  266. _needed=((a2)-(a1))+(1);
  267. /*[IF*/
  268. if((_needed)>(0)){
  269. /*[IF*/
  270. if(((C)->_capacity/*4*/)<(_needed)){
  271. C->_storage=calloc(_needed,sizeof(T0*));
  272. C->_capacity=_needed;
  273. }
  274. else{
  275. /*[IRF3.6clear_all*/{T315* C1=C;
  276. T0* __value=NULL;
  277. /*[IRF3.6set_all_with*/{T315* C2=C1;
  278. T0* c1=__value;
  279. r316set_all_with((C2)->_storage/*0*/,c1,((C2)->_upper/*8*/)-((C2)->_lower/*12*/));
  280. }/*]*/
  281. }/*]*/
  282. }
  283. /*FI]*/
  284. }
  285. /*FI]*/
  286. }
  287.  
  288.  
  289. T2 r315fast_index_of(T315* C,T0* a1){
  290. T2 R=0;
  291. R=((C)->_lower/*12*/)+(r316fast_index_of((C)->_storage/*0*/,a1,((C)->_upper/*8*/)-((C)->_lower/*12*/)));
  292. return R;
  293. }
  294. /*No:ARRAY[E_REQUIRE].upper*/
  295.  
  296.  
  297. void r315clear(T315* C){
  298. C->_upper=((C)->_lower/*12*/)-(1);
  299. }
  300.  
  301.  
  302. T6 r315empty(T315* C){
  303. T6 R=0;
  304. R=(r315count(C))==(0);
  305. return R;
  306. }
  307. /*No:ARRAY[E_REQUIRE].capacity*/
  308. /*No:ARRAY[E_REQUIRE].put*/
  309. /*No:ARRAY[E_REQUIRE].storage*/
  310.  
  311.  
  312. T0* r226twin(T226* C){
  313. T0* R=NULL;
  314. R=malloc(sizeof(*C));
  315. *((T226*)R)=M226;
  316. r226copy(((T226*)R),((T0*)C));
  317. return R;
  318. }
  319.  
  320.  
  321. void r226add_last(T226* C,T0* a1){
  322. T2 _new_capacity=0;
  323. /*[IF*/
  324. if(((C)->_capacity/*4*/)<((r226count(C))+(1))){
  325. /*[IF*/
  326. if(((C)->_capacity/*4*/)==(0)){
  327. C->_capacity=16;
  328. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  329. }
  330. else{
  331. _new_capacity=(2)*((C)->_capacity/*4*/);
  332. C->_storage=r227realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  333. C->_capacity=_new_capacity;
  334. }
  335. /*FI]*/
  336. }
  337. /*FI]*/
  338. C->_upper=((C)->_upper/*8*/)+(1);
  339. /*[IRF3.6put*/{T226* C1=C;
  340. T0* b1=a1;
  341. T2 b2=(C)->_upper/*8*/;
  342. ((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
  343. }/*]*/
  344. }
  345.  
  346.  
  347. T0* r226item(T226* C,T2 a1){
  348. T0* R=NULL;
  349. R=((C)->_storage/*0*/)[(a1)-((C)->_lower/*12*/)];
  350. return R;
  351. }
  352.  
  353.  
  354. T2 r226count(T226* C){
  355. T2 R=0;
  356. R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  357. return R;
  358. }
  359. /*No:ARRAY[WHEN_ITEM].lower*/
  360. /*No:ARRAY[WHEN_ITEM].upper*/
  361.  
  362.  
  363. void r226copy(T226* C,T0* a1){
  364. T2 _needed_capacity=0;
  365. C->_lower=(((T226*)a1))->_lower/*12*/;
  366. C->_upper=(((T226*)a1))->_upper/*8*/;
  367. _needed_capacity=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  368. /*[IF*/
  369. if(((C)->_capacity/*4*/)<(_needed_capacity)){
  370. C->_capacity=_needed_capacity;
  371. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  372. }
  373. /*FI]*/
  374. /*[IF*/
  375. if((_needed_capacity)>(0)){
  376. r227copy_from((C)->_storage/*0*/,(((T226*)a1))->_storage/*0*/,(_needed_capacity)-(1));
  377. }
  378. /*FI]*/
  379. }
  380. /*No:ARRAY[WHEN_ITEM].capacity*/
  381. /*No:ARRAY[WHEN_ITEM].put*/
  382. /*No:ARRAY[WHEN_ITEM].storage*/
  383.  
  384.  
  385. void r350clear_all(T350* C){
  386. T0* _value=NULL;
  387. /*[IRF3.6set_all_with*/{T350* C1=C;
  388. T0* b1=_value;
  389. r250set_all_with((C1)->_storage/*4*/,b1,(C1)->_upper/*12*/);
  390. }/*]*/
  391. }
  392. /*No:FIXED_ARRAY[TYPE].set_all_with*/
  393.  
  394.  
  395. T2 r350count(T350* C){
  396. T2 R=0;
  397. R=((C)->_upper/*12*/)+(1);
  398. return R;
  399. }
  400.  
  401.  
  402. void r350resize(T350* C,T2 a1){
  403. T0* _elt_default=NULL;
  404. T2 _i=0;
  405. T2 _new_capacity=0;
  406. /*[IF*/
  407. if((a1)<=(r350count(C))){
  408. C->_upper=(a1)-(1);
  409. }
  410. else{
  411. _new_capacity=a1;
  412. /*[IF*/
  413. if(((C)->_capacity/*8*/)<(_new_capacity)){
  414. /*[IF*/
  415. if(((C)->_capacity/*8*/)==(0)){
  416. C->_storage=calloc(_new_capacity,sizeof(T0*));
  417. }
  418. else{
  419. C->_storage=r250realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  420. }
  421. /*FI]*/
  422. C->_capacity=_new_capacity;
  423. }
  424. /*FI]*/
  425. _new_capacity=(C)->_upper/*12*/;
  426. C->_upper=(a1)-(1);
  427. _i=(C)->_upper/*12*/;
  428. while (!((_i)==(_new_capacity))) {
  429. /*[IRF3.6put*/{T350* C1=C;
  430. T0* b1=_elt_default;
  431. T2 b2=_i;
  432. ((C1)->_storage/*4*/)[b2]=(b1);
  433. }/*]*/
  434. _i=(_i)-(1);
  435. }
  436. }
  437. /*FI]*/
  438. }
  439.  
  440.  
  441. void r350make(T350* C,T2 a1){
  442. /*[IF*/
  443. if((a1)==(0)){
  444. C->_upper=-(1);
  445. }
  446.  else if(((C)->_capacity/*8*/)==(0)){
  447. C->_storage=calloc(a1,sizeof(T0*));
  448. C->_capacity=a1;
  449. C->_upper=(a1)-(1);
  450. }
  451.  else if(((C)->_capacity/*8*/)<(a1)){
  452. C->_storage=calloc(a1,sizeof(T0*));
  453. C->_capacity=a1;
  454. C->_upper=(a1)-(1);
  455. }
  456. else{
  457. C->_upper=(a1)-(1);
  458. r350clear_all(C);
  459. }
  460. /*FI]*/
  461. }
  462. /*No:FIXED_ARRAY[TYPE].upper*/
  463. /*No:FIXED_ARRAY[TYPE].capacity*/
  464. /*No:FIXED_ARRAY[TYPE].put*/
  465. /*No:FIXED_ARRAY[TYPE].storage*/
  466.  
  467.  
  468. void r352with_capacity(T352* C,T2 a1){
  469. /*[IF*/
  470. if(((C)->_capacity/*8*/)<(a1)){
  471. C->_storage=calloc(a1,sizeof(T0*));
  472. C->_capacity=a1;
  473. }
  474. /*FI]*/
  475. C->_upper=-(1);
  476. }
  477.  
  478.  
  479. T0* r352twin(T352* C){
  480. T0* R=NULL;
  481. R=malloc(sizeof(*C));
  482. *((T352*)R)=M352;
  483. r352copy(((T352*)R),((T0*)C));
  484. return R;
  485. }
  486.  
  487.  
  488. void r352add_last(T352* C,T0* a1){
  489. T2 _new_capacity=0;
  490. /*[IF*/
  491. if((((C)->_upper/*12*/)+(1))<=(((C)->_capacity/*8*/)-(1))){
  492. C->_upper=((C)->_upper/*12*/)+(1);
  493. }
  494.  else if(((C)->_capacity/*8*/)==(0)){
  495. C->_storage=calloc(2,sizeof(T0*));
  496. C->_capacity=2;
  497. C->_upper=0;
  498. }
  499. else{
  500. _new_capacity=(2)*((C)->_capacity/*8*/);
  501. C->_storage=r353realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  502. C->_capacity=_new_capacity;
  503. C->_upper=((C)->_upper/*12*/)+(1);
  504. }
  505. /*FI]*/
  506. /*[IRF3.5put*/((C)->_storage/*4*/)[(C)->_upper/*12*/]=(a1);
  507. /*]*/
  508. }
  509. /*No:FIXED_ARRAY[ADDRESS_OF].item*/
  510. /*No:FIXED_ARRAY[ADDRESS_OF].upper*/
  511.  
  512.  
  513. void r352copy(T352* C,T0* a1){
  514. T2 _new_capacity=0;
  515. T2 _other_upper=0;
  516. _other_upper=(((T352*)a1))->_upper/*12*/;
  517. /*[IF*/
  518. if((_other_upper)>=(0)){
  519. _new_capacity=(_other_upper)+(1);
  520. /*[IF*/
  521. if(((C)->_capacity/*8*/)<(_new_capacity)){
  522. C->_capacity=_new_capacity;
  523. C->_storage=calloc(_new_capacity,sizeof(T0*));
  524. }
  525.  else if(((C)->_capacity/*8*/)>(0)){
  526. r353clear_all((C)->_storage/*4*/,((C)->_capacity/*8*/)-(1));
  527. }
  528. /*FI]*/
  529. r353copy_from((C)->_storage/*4*/,(((T352*)a1))->_storage/*4*/,_other_upper);
  530. }
  531.  else if(((C)->_capacity/*8*/)>(0)){
  532. r353clear_all((C)->_storage/*4*/,((C)->_capacity/*8*/)-(1));
  533. }
  534. /*FI]*/
  535. C->_upper=_other_upper;
  536. }
  537. /*No:FIXED_ARRAY[ADDRESS_OF].capacity*/
  538. /*No:FIXED_ARRAY[ADDRESS_OF].put*/
  539. /*No:FIXED_ARRAY[ADDRESS_OF].storage*/
  540.  
  541.  
  542. void r64with_capacity(T64* C,T2 a1){
  543. /*[IF*/
  544. if(((C)->_capacity/*4*/)<(a1)){
  545. C->_storage=calloc(a1,sizeof(T0*));
  546. C->_capacity=a1;
  547. }
  548. /*FI]*/
  549. C->_upper=-(1);
  550. }
  551. /*No:FIXED_ARRAY[BASE_CLASS].clear_all*/
  552.  
  553.  
  554. void r64add_last(T64* C,T0* a1){
  555. T2 _new_capacity=0;
  556. /*[IF*/
  557. if((((C)->_upper/*8*/)+(1))<=(((C)->_capacity/*4*/)-(1))){
  558. C->_upper=((C)->_upper/*8*/)+(1);
  559. }
  560.  else if(((C)->_capacity/*4*/)==(0)){
  561. C->_storage=calloc(2,sizeof(T0*));
  562. C->_capacity=2;
  563. C->_upper=0;
  564. }
  565. else{
  566. _new_capacity=(2)*((C)->_capacity/*4*/);
  567. C->_storage=r65realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  568. C->_capacity=_new_capacity;
  569. C->_upper=((C)->_upper/*8*/)+(1);
  570. }
  571. /*FI]*/
  572. /*[IRF3.5put*/((C)->_storage/*0*/)[(C)->_upper/*8*/]=(a1);
  573. /*]*/
  574. }
  575. /*No:FIXED_ARRAY[BASE_CLASS].item*/
  576. /*No:FIXED_ARRAY[BASE_CLASS].set_all_with*/
  577.  
  578.  
  579. T6 r64valid_index(T64* C,T2 a1){
  580. T6 R=0;
  581. R=((0)<=(a1))&&((a1)<=((C)->_upper/*8*/));
  582. return R;
  583. }
  584. /*No:FIXED_ARRAY[BASE_CLASS].first*/
  585. /*No:FIXED_ARRAY[BASE_CLASS].count*/
  586. /*No:FIXED_ARRAY[BASE_CLASS].lower*/
  587.  
  588.  
  589. void r64resize(T64* C,T2 a1){
  590. T0* _elt_default=NULL;
  591. T2 _i=0;
  592. T2 _new_capacity=0;
  593. /*[IF*/
  594. if((a1)<=(/*(IRF4.6count*/((C)->_upper/*8*/)+(1)/*)*/)){
  595. C->_upper=(a1)-(1);
  596. }
  597. else{
  598. _new_capacity=a1;
  599. /*[IF*/
  600. if(((C)->_capacity/*4*/)<(_new_capacity)){
  601. /*[IF*/
  602. if(((C)->_capacity/*4*/)==(0)){
  603. C->_storage=calloc(_new_capacity,sizeof(T0*));
  604. }
  605. else{
  606. C->_storage=r65realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  607. }
  608. /*FI]*/
  609. C->_capacity=_new_capacity;
  610. }
  611. /*FI]*/
  612. _new_capacity=(C)->_upper/*8*/;
  613. C->_upper=(a1)-(1);
  614. _i=(C)->_upper/*8*/;
  615. while (!((_i)==(_new_capacity))) {
  616. /*[IRF3.5put*/((C)->_storage/*0*/)[_i]=(_elt_default);
  617. /*]*/
  618. _i=(_i)-(1);
  619. }
  620. }
  621. /*FI]*/
  622. }
  623.  
  624.  
  625. T6 r64fast_has(T64* C,T0* a1){
  626. T6 R=0;
  627. R=r64valid_index(C,r64fast_index_of(C,a1));
  628. return R;
  629. }
  630.  
  631.  
  632. void r64make(T64* C,T2 a1){
  633. /*[IF*/
  634. if((a1)==(0)){
  635. C->_upper=-(1);
  636. }
  637.  else if(((C)->_capacity/*4*/)==(0)){
  638. C->_storage=calloc(a1,sizeof(T0*));
  639. C->_capacity=a1;
  640. C->_upper=(a1)-(1);
  641. }
  642.  else if(((C)->_capacity/*4*/)<(a1)){
  643. C->_storage=calloc(a1,sizeof(T0*));
  644. C->_capacity=a1;
  645. C->_upper=(a1)-(1);
  646. }
  647. else{
  648. C->_upper=(a1)-(1);
  649. /*[IRF3.6clear_all*/{T64* C1=C;
  650. T0* __value=NULL;
  651. /*[IRF3.6set_all_with*/{T64* C2=C1;
  652. T0* c1=__value;
  653. r65set_all_with((C2)->_storage/*0*/,c1,(C2)->_upper/*8*/);
  654. }/*]*/
  655. }/*]*/
  656. }
  657. /*FI]*/
  658. }
  659.  
  660.  
  661. T2 r64fast_index_of(T64* C,T0* a1){
  662. T2 R=0;
  663. R=r65fast_index_of((C)->_storage/*0*/,a1,(C)->_upper/*8*/);
  664. return R;
  665. }
  666. /*No:FIXED_ARRAY[BASE_CLASS].upper*/
  667. /*No:FIXED_ARRAY[BASE_CLASS].clear*/
  668. /*No:FIXED_ARRAY[BASE_CLASS].capacity*/
  669. /*No:FIXED_ARRAY[BASE_CLASS].put*/
  670. /*No:FIXED_ARRAY[BASE_CLASS].storage*/
  671.  
  672.  
  673. void r138with_capacity(T138* C,T2 a1){
  674. /*[IF*/
  675. if(((C)->_capacity/*8*/)<(a1)){
  676. C->_storage=calloc(a1,sizeof(T0*));
  677. C->_capacity=a1;
  678. }
  679. /*FI]*/
  680. C->_upper=-(1);
  681. }
  682.  
  683.  
  684. T0* r138twin(T138* C){
  685. T0* R=NULL;
  686. R=malloc(sizeof(*C));
  687. *((T138*)R)=M138;
  688. r138copy(((T138*)R),((T0*)C));
  689. return R;
  690. }
  691.  
  692.  
  693. void r138add_last(T138* C,T0* a1){
  694. T2 _new_capacity=0;
  695. /*[IF*/
  696. if((((C)->_upper/*12*/)+(1))<=(((C)->_capacity/*8*/)-(1))){
  697. C->_upper=((C)->_upper/*12*/)+(1);
  698. }
  699.  else if(((C)->_capacity/*8*/)==(0)){
  700. C->_storage=calloc(2,sizeof(T0*));
  701. C->_capacity=2;
  702. C->_upper=0;
  703. }
  704. else{
  705. _new_capacity=(2)*((C)->_capacity/*8*/);
  706. C->_storage=r99realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  707. C->_capacity=_new_capacity;
  708. C->_upper=((C)->_upper/*12*/)+(1);
  709. }
  710. /*FI]*/
  711. /*[IRF3.6put*/{T138* C1=C;
  712. T0* b1=a1;
  713. T2 b2=(C)->_upper/*12*/;
  714. ((C1)->_storage/*4*/)[b2]=(b1);
  715. }/*]*/
  716. }
  717.  
  718.  
  719. T0* r138item(T138* C,T2 a1){
  720. T0* R=NULL;
  721. R=((C)->_storage/*4*/)[a1];
  722. return R;
  723. }
  724. /*No:FIXED_ARRAY[EXPRESSION].upper*/
  725.  
  726.  
  727. void r138copy(T138* C,T0* a1){
  728. T2 _new_capacity=0;
  729. T2 _other_upper=0;
  730. _other_upper=/*X138upper*/((T2)(((T138*)a1))->_upper/*12*/);
  731. /*[IF*/
  732. if((_other_upper)>=(0)){
  733. _new_capacity=(_other_upper)+(1);
  734. /*[IF*/
  735. if(((C)->_capacity/*8*/)<(_new_capacity)){
  736. C->_capacity=_new_capacity;
  737. C->_storage=calloc(_new_capacity,sizeof(T0*));
  738. }
  739.  else if(((C)->_capacity/*8*/)>(0)){
  740. r99clear_all((C)->_storage/*4*/,((C)->_capacity/*8*/)-(1));
  741. }
  742. /*FI]*/
  743. r99copy_from((C)->_storage/*4*/,/*X138storage*/((T99)(((T138*)a1))->_storage/*4*/),_other_upper);
  744. }
  745.  else if(((C)->_capacity/*8*/)>(0)){
  746. r99clear_all((C)->_storage/*4*/,((C)->_capacity/*8*/)-(1));
  747. }
  748. /*FI]*/
  749. C->_upper=_other_upper;
  750. }
  751. /*No:FIXED_ARRAY[EXPRESSION].capacity*/
  752. /*No:FIXED_ARRAY[EXPRESSION].storage*/
  753. /*No:FIXED_ARRAY[EXPRESSION].put*/
  754.  
  755.  
  756. void r184with_capacity(T184* C,T2 a1){
  757. /*[IF*/
  758. if(((C)->_capacity/*4*/)<(a1)){
  759. C->_storage=calloc(a1,sizeof(T0*));
  760. C->_capacity=a1;
  761. }
  762. /*FI]*/
  763. C->_upper=-(1);
  764. }
  765.  
  766.  
  767. void r184add_last(T184* C,T0* a1){
  768. T2 _new_capacity=0;
  769. /*[IF*/
  770. if((((C)->_upper/*8*/)+(1))<=(((C)->_capacity/*4*/)-(1))){
  771. C->_upper=((C)->_upper/*8*/)+(1);
  772. }
  773.  else if(((C)->_capacity/*4*/)==(0)){
  774. C->_storage=calloc(2,sizeof(T0*));
  775. C->_capacity=2;
  776. C->_upper=0;
  777. }
  778. else{
  779. _new_capacity=(2)*((C)->_capacity/*4*/);
  780. C->_storage=r185realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  781. C->_capacity=_new_capacity;
  782. C->_upper=((C)->_upper/*8*/)+(1);
  783. }
  784. /*FI]*/
  785. /*[IRF3.5put*/((C)->_storage/*0*/)[(C)->_upper/*8*/]=(a1);
  786. /*]*/
  787. }
  788. /*No:FIXED_ARRAY[CLASS_NAME].item*/
  789. /*No:FIXED_ARRAY[CLASS_NAME].upper*/
  790. /*No:FIXED_ARRAY[CLASS_NAME].capacity*/
  791. /*No:FIXED_ARRAY[CLASS_NAME].storage*/
  792. /*No:FIXED_ARRAY[CLASS_NAME].put*/
  793.  
  794.  
  795. void r308add_last(T308* C,T0* a1){
  796. T2 _new_capacity=0;
  797. /*[IF*/
  798. if(((C)->_capacity/*4*/)<((r308count(C))+(1))){
  799. /*[IF*/
  800. if(((C)->_capacity/*4*/)==(0)){
  801. C->_capacity=16;
  802. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  803. }
  804. else{
  805. _new_capacity=(2)*((C)->_capacity/*4*/);
  806. C->_storage=r309realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  807. C->_capacity=_new_capacity;
  808. }
  809. /*FI]*/
  810. }
  811. /*FI]*/
  812. C->_upper=((C)->_upper/*8*/)+(1);
  813. /*[IRF3.6put*/{T308* C1=C;
  814. T0* b1=a1;
  815. T2 b2=(C)->_upper/*8*/;
  816. ((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
  817. }/*]*/
  818. }
  819.  
  820.  
  821. T2 r308count(T308* C){
  822. T2 R=0;
  823. R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  824. return R;
  825. }
  826. /*No:ARRAY[INDEX_CLAUSE].lower*/
  827. /*No:ARRAY[INDEX_CLAUSE].upper*/
  828. /*No:ARRAY[INDEX_CLAUSE].capacity*/
  829. /*No:ARRAY[INDEX_CLAUSE].put*/
  830. /*No:ARRAY[INDEX_CLAUSE].storage*/
  831.  
  832.